package com.example.lanou.mynews.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.example.lanou.mynews.R;
import com.example.lanou.mynews.application.MyApplication;
import com.example.lanou.mynews.beans.PerDataBeans;

import java.util.List;

/**
 * Created by dllo on 16/1/14.
 */
public class NormalFragAdapter extends BaseAdapter {
    private List<PerDataBeans> data;


    public void setData(List<PerDataBeans> data){
        this.data=data;
        notifyDataSetChanged();
    }

    @Override
    public int getCount() {
        return data==null?0:data.size();
    }


    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }


    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if(null==convertView)
            convertView= LayoutInflater.from(MyApplication.getContext()).inflate(R.layout.item_type4,parent,false);
        return convertView;
    }

}
